<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>My Project: drogon::HttpFilterBase类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacedrogon.html">drogon</a></li><li class="navelem"><a class="el" href="classdrogon_1_1HttpFilterBase.html">HttpFilterBase</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="classdrogon_1_1HttpFilterBase-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">drogon::HttpFilterBase类 参考<span class="mlabels"><span class="mlabel">abstract</span></span></div></div>
</div><!--header-->
<div class="contents">

<p>The abstract base class for filters For more details on the class, see the wiki site (the 'Filter' section)  
 <a href="classdrogon_1_1HttpFilterBase.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="HttpFilter_8h_source.html">HttpFilter.h</a>&gt;</code></p>
<div class="dynheader">
类 drogon::HttpFilterBase 继承关系图:</div>
<div class="dyncontent">
<div class="center"><img src="classdrogon_1_1HttpFilterBase__inherit__graph.png" border="0" usemap="#adrogon_1_1HttpFilterBase_inherit__map" alt="Inheritance graph"/></div>
<map name="adrogon_1_1HttpFilterBase_inherit__map" id="adrogon_1_1HttpFilterBase_inherit__map">
<area shape="rect" title="The abstract base class for filters For more details on the class, see the wiki site (the &#39;Filter&#39; se..." alt="" coords="476,77,644,102"/>
<area shape="rect" href="classdrogon_1_1HttpFilter.html" title=" " alt="" coords="695,5,843,45"/>
<area shape="poly" title=" " alt="" coords="615,70,702,43,703,48,616,75"/>
<area shape="rect" href="classdrogon_1_1HttpFilter.html" title=" " alt="" coords="694,69,843,109"/>
<area shape="poly" title=" " alt="" coords="658,87,694,87,694,92,658,92"/>
<area shape="rect" href="classdrogon_1_1HttpFilter.html" title="The reflection base class template for filters" alt="" coords="692,133,845,173"/>
<area shape="poly" title=" " alt="" coords="616,104,703,131,702,136,615,109"/>
<area shape="rect" href="classdrogon_1_1DrObjectBase.html" title="The base class for all drogon reflection classes." alt="" coords="5,77,169,102"/>
<area shape="poly" title=" " alt="" coords="183,87,476,87,476,92,183,92"/>
<area shape="rect" href="classdrogon_1_1HttpMiddlewareBase.html" title="The abstract base class for middleware" alt="" coords="217,102,428,127"/>
<area shape="poly" title=" " alt="" coords="183,97,217,101,217,106,183,102"/>
<area shape="poly" title=" " alt="" coords="441,99,476,96,476,101,442,105"/>
<area shape="rect" href="classdrogon_1_1IntranetIpFilter.html" title="A filter that prohibit access from external networks" alt="" coords="894,13,1065,38"/>
<area shape="poly" title=" " alt="" coords="856,23,894,23,894,28,856,28"/>
<area shape="rect" href="classdrogon_1_1LocalHostFilter.html" title="A filter that prohibit access from other hosts." alt="" coords="893,77,1065,102"/>
<area shape="poly" title=" " alt="" coords="858,87,893,87,893,92,858,92"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">图例</a>]</span></center></div>
<div class="dynheader">
drogon::HttpFilterBase 的协作图:</div>
<div class="dyncontent">
<div class="center"><img src="classdrogon_1_1HttpFilterBase__coll__graph.png" border="0" usemap="#adrogon_1_1HttpFilterBase_coll__map" alt="Collaboration graph"/></div>
<map name="adrogon_1_1HttpFilterBase_coll__map" id="adrogon_1_1HttpFilterBase_coll__map">
<area shape="rect" title="The abstract base class for filters For more details on the class, see the wiki site (the &#39;Filter&#39; se..." alt="" coords="5,152,173,177"/>
<area shape="rect" href="classdrogon_1_1DrObjectBase.html" title="The base class for all drogon reflection classes." alt="" coords="7,5,171,31"/>
<area shape="poly" title=" " alt="" coords="69,42,49,71,45,87,47,103,61,129,79,150,75,153,56,132,41,105,40,87,44,69,64,39"/>
<area shape="rect" href="classdrogon_1_1HttpMiddlewareBase.html" title="The abstract base class for middleware" alt="" coords="56,79,267,104"/>
<area shape="poly" title=" " alt="" coords="113,39,152,77,148,80,109,43"/>
<area shape="poly" title=" " alt="" coords="141,116,103,154,99,150,138,112"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">图例</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:acf0abedbbcbd7622d6d6c6b9b9138537" id="r_acf0abedbbcbd7622d6d6c6b9b9138537"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpFilterBase.html#acf0abedbbcbd7622d6d6c6b9b9138537">doFilter</a> (const <a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a> &amp;req, <a class="el" href="namespacedrogon.html#a7afe27d30aeb06ed6316285d88c74ece">FilterCallback</a> &amp;&amp;fcb, <a class="el" href="namespacedrogon.html#a10f3a62986d997964a86c6516985818e">FilterChainCallback</a> &amp;&amp;fccb)=0</td></tr>
<tr class="memdesc:acf0abedbbcbd7622d6d6c6b9b9138537"><td class="mdescLeft">&#160;</td><td class="mdescRight">This virtual function should be overridden in subclasses.  <br /></td></tr>
<tr class="separator:acf0abedbbcbd7622d6d6c6b9b9138537"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05f7bb5321e6672f6e64de7c00f35145" id="r_a05f7bb5321e6672f6e64de7c00f35145"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpFilterBase.html#a05f7bb5321e6672f6e64de7c00f35145">~HttpFilterBase</a> () override=default</td></tr>
<tr class="separator:a05f7bb5321e6672f6e64de7c00f35145"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classdrogon_1_1DrObjectBase"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classdrogon_1_1DrObjectBase')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classdrogon_1_1DrObjectBase.html">drogon::DrObjectBase</a></td></tr>
<tr class="memitem:a3b6f9f93fce1cb61c43bebea00b77582 inherit pub_methods_classdrogon_1_1DrObjectBase" id="r_a3b6f9f93fce1cb61c43bebea00b77582"><td class="memItemLeft" align="right" valign="top">virtual const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1DrObjectBase.html#a3b6f9f93fce1cb61c43bebea00b77582">className</a> () const</td></tr>
<tr class="memdesc:a3b6f9f93fce1cb61c43bebea00b77582 inherit pub_methods_classdrogon_1_1DrObjectBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the class name  <br /></td></tr>
<tr class="separator:a3b6f9f93fce1cb61c43bebea00b77582 inherit pub_methods_classdrogon_1_1DrObjectBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a847a57ab1e5cac6e70a910ae5e3f759b inherit pub_methods_classdrogon_1_1DrObjectBase" id="r_a847a57ab1e5cac6e70a910ae5e3f759b"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1DrObjectBase.html#a847a57ab1e5cac6e70a910ae5e3f759b">isClass</a> (const std::string &amp;class_name) const</td></tr>
<tr class="memdesc:a847a57ab1e5cac6e70a910ae5e3f759b inherit pub_methods_classdrogon_1_1DrObjectBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if the class name is 'class_name'  <br /></td></tr>
<tr class="separator:a847a57ab1e5cac6e70a910ae5e3f759b inherit pub_methods_classdrogon_1_1DrObjectBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a57e74527aea2d71d9f471b39c70d1b inherit pub_methods_classdrogon_1_1DrObjectBase" id="r_a3a57e74527aea2d71d9f471b39c70d1b"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1DrObjectBase.html#a3a57e74527aea2d71d9f471b39c70d1b">~DrObjectBase</a> ()</td></tr>
<tr class="separator:a3a57e74527aea2d71d9f471b39c70d1b inherit pub_methods_classdrogon_1_1DrObjectBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classdrogon_1_1HttpMiddlewareBase"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classdrogon_1_1HttpMiddlewareBase')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classdrogon_1_1HttpMiddlewareBase.html">drogon::HttpMiddlewareBase</a></td></tr>
<tr class="memitem:af18c5aaadfbad541c4a049cbb6dfb612 inherit pub_methods_classdrogon_1_1HttpMiddlewareBase" id="r_af18c5aaadfbad541c4a049cbb6dfb612"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1HttpMiddlewareBase.html#af18c5aaadfbad541c4a049cbb6dfb612">~HttpMiddlewareBase</a> () override=default</td></tr>
<tr class="separator:af18c5aaadfbad541c4a049cbb6dfb612 inherit pub_methods_classdrogon_1_1HttpMiddlewareBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>The abstract base class for filters For more details on the class, see the wiki site (the 'Filter' section) </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a05f7bb5321e6672f6e64de7c00f35145" name="a05f7bb5321e6672f6e64de7c00f35145"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05f7bb5321e6672f6e64de7c00f35145">&#9670;&#160;</a></span>~HttpFilterBase()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">drogon::HttpFilterBase::~HttpFilterBase </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">default</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="acf0abedbbcbd7622d6d6c6b9b9138537" name="acf0abedbbcbd7622d6d6c6b9b9138537"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acf0abedbbcbd7622d6d6c6b9b9138537">&#9670;&#160;</a></span>doFilter()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void drogon::HttpFilterBase::doFilter </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a> &amp;&#160;</td>
          <td class="paramname"><em>req</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacedrogon.html#a7afe27d30aeb06ed6316285d88c74ece">FilterCallback</a> &amp;&amp;&#160;</td>
          <td class="paramname"><em>fcb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacedrogon.html#a10f3a62986d997964a86c6516985818e">FilterChainCallback</a> &amp;&amp;&#160;</td>
          <td class="paramname"><em>fccb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This virtual function should be overridden in subclasses. </p>
<p>This method is an asynchronous interface, user should return the result via 'FilterCallback' or 'FilterChainCallback'. </p><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">req</td><td>is the request object processed by the filter </td></tr>
    <tr><td class="paramname">fcb</td><td>if this is called, the response object is send to the client by the callback, and doFilter methods of next filters and the handler registered on the path are not called anymore. </td></tr>
    <tr><td class="paramname">fccb</td><td>if this callback is called, the next filter's doFilter method or the handler registered on the path is called. </td></tr>
  </table>
  </dd>
</dl>

<p>在 <a class="el" href="classdrogon_1_1IntranetIpFilter.html#a5f70d41401cdb83c923d1c543e7379e8">drogon::IntranetIpFilter</a> , 以及 <a class="el" href="classdrogon_1_1LocalHostFilter.html#a987edd3e8840046e1d1f7bdd6edc46ba">drogon::LocalHostFilter</a> 内被实现.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li><a class="el" href="HttpFilter_8h_source.html">HttpFilter.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>
